<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Rule/Mall_refundrules.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Rule/Mall_refundrules.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '退款规则',
                    name: 'Mall_refundrules',
                    url: "/Refundrules/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"basic":"","isAddTicket":"","afterDate":"","beforeDate":"","isSplitRefund":"","creator":"","createID":"","createDate":"","modifier":"","modifyID":"","modifyDate":"","merchantCode":"","merchantName":""},
                editFormOptions: [[{"dataKey":"enable","data":[],"title":"是否可退","field":"basic","type":"select"},
                               {"title":"是否加票","field":"isAddTicket","type":"switch"}],
                              [{"title":"有效期后几天","field":"afterDate","type":"text"},
                               {"title":"有效期前几天","field":"beforeDate","type":"text"},
                               {"title":"支持分笔退款开关","field":"isSplitRefund","type":"switch"}]],
                searchFormFields: {"basic":""},
                searchFormOptions: [[{"dataKey":"enable","data":[],"title":"是否可退","field":"basic","type":"select"}]],
                columns: [{field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'reviewTime',title:'审核时间',type:'datetime',width:90,hidden:true,align:'left',sortable:true},
                       {field:'refundRules',title:'退款规则',type:'string',width:220,hidden:true,align:'left'},
                       {field:'refundAtLatest',title:'最晚退款提前?天',type:'int',width:90,hidden:true,align:'left'},
                       {field:'refundCalendar',title:'退款日历',type:'datetime',width:90,hidden:true,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left',sortable:true},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,hidden:true,align:'left'},
                       {field:'refundName',title:'退改名称',type:'string',width:120,hidden:true,align:'left'},
                       {field:'autoEnd',title:'X天后自动完结',type:'int',width:120,hidden:true,align:'left'},
                       {field:'isAutoEnd',title:'是否自动完结',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'isAvailable',title:'是否可用',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'isDelete',title:'是否删除',type:'int',width:120,hidden:true,align:'left'},
                       {field:'isExpirationRefundable',title:'过期是否可退',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'isRefundable',title:'是否可退',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'isRefundReview',title:'退款是否审核',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'refundCode',title:'退改模板编码',type:'string',width:120,hidden:true,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:120,hidden:true,align:'left'},
                       {field:'rules',title:'退改规则',type:'string',width:120,hidden:true,align:'left'},
                       {field:'afterDate',title:'有效期后几天',type:'int',width:120,align:'left'},
                       {field:'basic',title:'基础条件 1 随时退 2 条件退（日期前/后几天） 3 不可退',type:'string',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'beforeDate',title:'有效期前几天',type:'int',width:120,align:'left'},
                       {field:'isAddTicket',title:'是否加票',type:'int',width:120,align:'left'},
                       {field:'isRefund',title:'是否可退',type:'int',width:120,hidden:true,align:'left'},
                       {field:'isSplitRefund',title:'支持分笔退款开关',type:'int',width:120,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
